package com.xmlrpc.service;

import java.util.Map;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping;

public class SpringHandlerMapping extends AbstractReflectiveHandlerMapping {
	public void setHandlerMapping(Map<String, IHandler> handlerMappings) throws XmlRpcException {
		SpringRequestProcessorFactory ff = (SpringRequestProcessorFactory) getRequestProcessorFactoryFactory();
		ff.init(handlerMappings);
		for (String serviceName : handlerMappings.keySet()) {
			IHandler serviceBean = handlerMappings.get(serviceName);
			registerPublicMethods(serviceName, serviceBean.getClass());
		}
	}
}
